﻿using AutoMapper;
using Dyao.Book.Contract;
using Dyao.Book.Entity;

namespace Dyao.Book.Application
{
    public class ModelMappingProfile : Profile
    {
        public ModelMappingProfile()
        {
            #region // 任务中心

            CreateMap<TaskCenterRecordKeylessEntity, TaskCenterRecordPageDto>().ReverseMap();
            CreateMap<TaskCenterRecordDto, TaskCenterRecordDto>().ReverseMap();
            CreateMap<TaskCenterRecordAddDto, TaskCenterRecordDto>().ReverseMap();
            CreateMap<TaskCenterRecordExtensionDto, TaskCenterRecordExtensionDto>().ReverseMap();
            CreateMap<TaskCenterRecordExtensionAddDto, TaskCenterRecordExtensionDto>().ReverseMap();
            CreateMap<TaskCenterRecordLogEntity, TaskCenterRecordLogDto>().ReverseMap();
            CreateMap<TaskCenterSettingsEntity, TaskCenterSettingsDto>().ReverseMap();
            CreateMap<TaskCenterRuleEntity, TaskCenterRuleDto>().ReverseMap();
            CreateMap<TaskCenterRuleEntity, TaskCenterRuleAddOrEditDto>().ReverseMap();
            CreateMap<TaskCenterRecordEntity, TaskCenterRecordDto>();
            CreateMap<TaskCenter.ExtensionInfoLocal, TaskCenter.ExtensionInfoLocal>();
            CreateMap<TaskCenterRecordAddDto, TaskCenterRecordEntity>();
            CreateMap<TaskCenterRecordExtensionAddDto, TaskCenterRecordExtensionEntity>();

            #endregion  end 任务中心

            CreateMap<BookMatchSourceEntity, BookSourceDto>();
            CreateMap<BookEntity, BookResultDto>();
            CreateMap<BookInfoDto, BookEntity>();

            CreateMap<BookSourceWarehouseEntity, BookSourceSettingResultDto>();
            CreateMap<BookSourceSettingInfoDto, BookSourceWarehouseEntity>();


            CreateMap<BookCatalogueEntity, ChapterResultDto>();

            CreateMap<OperationLogDto, OperationLogEntity>();
            CreateMap<OperationLogEntity, OperationLogResultDto>();

            CreateMap<ChapterContentParseDto, BookCatalogueContentEntity>();
        }
    }
}
